package com.gcmm;

import com.github.kwhat.jnativehook.GlobalScreen;
import com.github.kwhat.jnativehook.NativeHookException;


public class Main {

    public static void main(String[] args) {
        try {
            // 开启后台监听
            GlobalScreen.registerNativeHook();

            // 添加键盘监听器
            // GlobalScreen.addNativeKeyListener(new GlobqalKeyListener());
             GlobalScreen.addNativeKeyListener(new SimpleGlobalKeyListener());

        } catch (NativeHookException ex) {
            System.err.println("按键监听报错！");
        }

    }


}

